package middlewares

import "github.com/gin-gonic/gin"

func DeleteProxyPrefix() gin.HandlerFunc {
	return func(c *gin.Context) {
		path := c.Request.URL.Path
		if len(path) > 7 && path[:7] == "/proxy/" {
			//保留一个/
			c.Request.URL.Path = path[6:]
		}
		c.Next()
	}
}
